package com.qst.crop.service.impl;

import com.qst.crop.dao.ReserveDao;
import com.qst.crop.entity.Reserve;
import com.qst.crop.service.ReserveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ReserveServiceImpl implements ReserveService {

    @Autowired
    private ReserveDao reserveDao;
    /**
     * @Description : 添加预约
     *  * @param reserve
     * @Return : com.qst.crop.common.Result
     */
    @Override
    public void add(Reserve reserve) {
        reserveDao.insert(reserve);
    }

    /**\
     *
     * @param username
     * @return List<Reserve>
     */
    @Override
    public List<Reserve> selectByKindQuestioner(String username){
        return reserveDao.selectByKindQuestioner(username);
    }

    @Override
    public List<Reserve> selectByKindExport(String username){
        return reserveDao.selectByKindExport(username);
    }

    @Override
    public Reserve selectById(Integer id){
        return reserveDao.selectById(id);
    }


    @Override
    public int update(Reserve reserve){
        return reserveDao.update(reserve);
    }
    @Override
    public int delById(Integer id){
        return reserveDao.delById(id);
    }

}
